import 'package:flutter/material.dart';

import 'multiBoardListExample.dart';
import 'multiBoardShrinkwrapListExample.dart';
import 'singleBoardListExample.dart';

class todoPage extends StatefulWidget {
  const todoPage({Key? key}) : super(key: key);

  @override
  State<todoPage> createState() => _todoPageState();
}

class _todoPageState extends State<todoPage> {
  int _currentIndex = 0;
  final _bottomNavigationColor = Colors.blue;

  final List<Widget> _examples = [
    const MultiBoardListExample(),
    const MultiBoardShrinkwrapListExample(),
    const SingleBoardListExample(),
  ];

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: const Text('AppFlowy Board')),
        body: Container(color: Colors.white, child: _examples[_currentIndex]),
        bottomNavigationBar: BottomNavigationBar(
          fixedColor: _bottomNavigationColor,
          showSelectedLabels: true,
          showUnselectedLabels: false,
          currentIndex: _currentIndex,
          items: [
            BottomNavigationBarItem(
              icon: Icon(Icons.grid_on, color: _bottomNavigationColor),
              label: "MultiColumn",
            ),
            BottomNavigationBarItem(
              icon: Icon(Icons.grid_on, color: _bottomNavigationColor),
              label: "MultiShrinkwrapColumn ",
            ),
            BottomNavigationBarItem(
              icon: Icon(Icons.grid_on, color: _bottomNavigationColor),
              label: "SingleColumn",
            ),
          ],
          onTap: (int index) {
            setState(() {
              _currentIndex = index;
            });
          },
        ),
      ),
    );
  }
}
